package com.threadmethod.paemon;

/**
 * @PackageName:com.threadmethod.paemon
 * @ClassName:Test08
 * @Description:
 * @Author: zhangxiaoyu
 * @date 2020/11/19 17:56
 */
public class Test08 {
   public static void main(String[] args){

       DaemonThread thread = new DaemonThread();
       //设置线程为守护线程   --设置守护线程的代码应该在线程启动前
       thread.setDaemon(true);
       thread.start();
       
       //当前线程为main线程
       for (int i=1;i<=10;i++){
           System.out.println("main:"+i);
       }

   }


}
